package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 添加套餐相关菜品
     * @param setmealDishes
     */
    void add(List<SetmealDish> setmealDishes);

    Integer findCountByIds(List<Long> ids);

    @Select("select dish_id from setmeal_dish where setmeal_id = #{id}")
    List<Long> findDishIds(Long id);

    void deletes(List<Long> ids);

    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void delete(Long id);
}
